package com.freeLearning.boot.system.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("consultant_user_chat_message")
public class ConsultantUserChatMessage {
    /**
     * 主键ID
     */
    @Schema(description = "主键ID")
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 发送者用户ID
     */
    @Schema(description = "发送者用户ID")
    private Long senderId;

    /**
     * 接收者用户ID
     */
    @Schema(description = "接收者用户ID")
    private Long receiverId;

    /**
     * 消息内容，如果是文本消息则存储文本内容
     */
    @Schema(description = "消息内容")
    private String content;

    /**
     * 消息发送时间
     */
    @Schema(description = "消息发送时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime sendTime;

    /**
     * 消息状态（0: 未读, 1: 已读）
     */
    @Schema(description = "消息状态")
    private Integer status;

    @Schema(description = "发送人姓名")
    private String senderName;

    @Schema(description = "接收人姓名")
    private String receiverName;

    @Schema(description = "发送人头像")
    private String senderAvatar;

    @Schema(description = "接收人头像")
    private String receiverAvatar;

}
